package com.zml.cruddemo.entity;
/**
 * 
 * @description 
 * @author <a href="#">MingLin.Zhao</a>
 * @date 2017年7月18日
 */
public class User {
	private Integer id;
	private String userName;
	private String passWord;
	private Integer age;
	
	public User() {
		super();
	}
	
	public String getPassWord() {
		return passWord;
	}

	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}

	public User(String userName, Integer age) {
		super();
		this.userName = userName;
		this.age = age;
	}

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result +id;
		result = prime * result+((userName == null) ? 0 : userName.hashCode());
		result = prime * result+((passWord == null) ? 0 : passWord.hashCode());
		result = prime * result +age;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		User other = (User) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", userName=" + userName + ", passWord=" + passWord + ", age=" + age + "]";
	}


	
}
